package com.ruoyi.business.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 话费充值订单对象 sd_recharge_order
 * 
 * @author xx
 * @date 2020-03-22
 */
public class RechargeOrder extends BaseEntity{
    /** 主键id */
    private Long id;

    /** 前端批量操作条件 */
    private String ids;

    /** 商家订单号 */
    @Excel(name = "商家订单号", type = Excel.Type.EXPORT)
    private String orderNum;

    /** 充值号码 */
    @Excel(name = "充值号码")
    @NotBlank(message = "手机号码不能为空")
    @Size(min = 11, max = 11, message = "手机号码长度{min}位")
    private String mobile;

    /** 充值类型 */
    @Excel(name = "充值类型", readConverterDict = "sd_recharge_channel", combo = true)
    @NotNull(message = "充值类型不能为空")
    private Integer rechargeChannel;

    /** 订单状态 1-充值中 2-成功 3-失败 */
    @Excel(name = "订单状态", type = Excel.Type.EXPORT, readConverterExp = "1=充值中,2=成功,3=失败")
    private Integer state;

    /** 充值面额 来源字典表 */
    @Excel(name = "充值面额", readConverterDict = "sd_recharge_money", combo = true)
    @NotNull(message = "充值面额不能为空")
    private Integer rechargeMoney;

    /** 金额 */
    @Excel(name = "金额", type = Excel.Type.EXPORT)
    private Double money;

    /** 商家id */
    @Excel(name = "业务表id", type = Excel.Type.EXPORT)
    private Long businessId;

    @Excel(name = "上游系统订单号", type = Excel.Type.EXPORT)
    private String orderNumUp;

    @Excel(name = "充值结果", type = Excel.Type.EXPORT)
    private String rechargeResult;

    /** 用户id */
    @Excel(name = "用户id", type = Excel.Type.EXPORT)
    private Long userId;

    @Excel(name = "结算状态", type = Excel.Type.EXPORT, readConverterDict = "sd_recharge_settlestatus")
    private Integer settleStatus;

    /** 下游接口的异步通知地址 */
    private String notifyUrl;

    /** 当前用户id和直属下级用户id集合 */
    private List<Long> userIds;

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }

    public Integer getSettleStatus() {
        return settleStatus;
    }

    public void setSettleStatus(Integer settleStatus) {
        this.settleStatus = settleStatus;
    }

    public List<Long> getUserIds() {
        return userIds;
    }

    public void setUserIds(List<Long> userIds) {
        this.userIds = userIds;
    }

    public String getRechargeResult() {
        return rechargeResult;
    }

    public void setRechargeResult(String rechargeResult) {
        this.rechargeResult = rechargeResult;
    }

    public String getOrderNumUp() {
        return orderNumUp;
    }

    public void setOrderNumUp(String orderNumUp) {
        this.orderNumUp = orderNumUp;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setId(Long id){
        this.id = id;
    }

    public Long getId(){
        return id;
    }
    public void setOrderNum(String orderNum){
        this.orderNum = orderNum;
    }

    public String getOrderNum(){
        return orderNum;
    }
    public void setMobile(String mobile){
        this.mobile = mobile;
    }

    public String getMobile(){
        return mobile;
    }
    public void setRechargeChannel(Integer rechargeChannel){
        this.rechargeChannel = rechargeChannel;
    }

    public Integer getRechargeChannel(){
        return rechargeChannel;
    }
    public void setState(Integer state){
        this.state = state;
    }

    public Integer getState(){
        return state;
    }
    public void setRechargeMoney(Integer rechargeMoney){
        this.rechargeMoney = rechargeMoney;
    }

    public Integer getRechargeMoney(){
        return rechargeMoney;
    }
    public void setMoney(Double money){
        this.money = money;
    }

    public Double getMoney(){
        return money;
    }
    public void setBusinessId(Long businessId){
        this.businessId = businessId;
    }

    public Long getBusinessId(){
        return businessId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNum", getOrderNum())
            .append("mobile", getMobile())
            .append("rechargeChannel", getRechargeChannel())
            .append("state", getState())
            .append("rechargeMoney", getRechargeMoney())
            .append("money", getMoney())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("businessId", getBusinessId())
            .append("userId", getUserId())
            .append("orderNumUp", getOrderNumUp())
            .append("rechargeResult", getRechargeResult())
            .toString();
    }
}
